package org.tea.inventory.enums;

import lombok.Getter;
import lombok.Setter;

/**
 * @author hanzy
 * @description 积分收支
 * @date 2023年04月06日 14:03
 */
public enum PmEnum {
    REVENUE(0, "收入"),
    EXPENSE(1, "支出"),
    ;

    @Getter
    @Setter
    private Integer code;
    @Getter
    @Setter
    private String content;

    PmEnum(Integer code, String content) {
        this.code = code;
        this.content = content;
    }

    public static String getContentByName(Integer code) {
        for (PmEnum actCategoryEnum : PmEnum.values()) {
            if (actCategoryEnum.getCode() == code) {
                return actCategoryEnum.getContent();
            }
        }
        return "";
    }
}
